package org.zs.asp06;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.junit.jupiter.api.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(1)
public class AspTransaction {

    @Before(value = "org.zs.asp06.CustomPoint.pc1()")
    public void beginTransaction() {
        System.out.println("AspTransaction 开启事务");
    }
    @AfterReturning(value = "org.zs.asp06.CustomPoint.pc1()")
    public void returnTransaction() {
        System.out.println("AspTransaction 提交事务");
    }
}
